export default {
  data() {
    return {
      fApi: {},
      options: {
        onSubmit: (formData) => {
          alert(JSON.stringify(formData));
        },
      },
      rule: [
        {
          type: "el-row",
          native: true,
          children: [
            {
              type: "el-col",
              props: {
                span: 12,
              },
              children: [
                {
                  type: "datePicker",
                  title: "活动日期",
                  field: "section_day",
                  value: ["2018-02-20 12:12:12", "2018-03-20 12:12:12"],
                  props: {
                    type: "datetimerange",
                  },
                },
                {
                  type: "timePicker",
                  title: "活动时间",
                  field: "section_time",
                  value: ["11:11:11", "22:22:22"],
                  props: {
                    isRange: true,
                    placeholder: "请选择活动时间",
                  },
                },
              ],
            },
            {
              type: "el-col",
              props: {
                span: 24,
              },
              children: [
                {
                  type: "inputNumber",
                  title: "排序",
                  field: "sort",
                  value: 0,
                  props: {
                    precision: 2,
                  },
                  col: {
                    span: 12,
                  },
                  validate: [
                    {
                      require: true,
                      type: "number",
                      min: 10,
                      message: "最小为10",
                    },
                  ],
                },
                {
                  type: "colorPicker",
                  title: "颜色",
                  field: "color",
                  value: "#ff7271",
                  props: {
                    hue: true,
                    format: "hex",
                  },
                  col: {
                    span: 12,
                  },
                },
              ],
            },
          ],
        },
      ],
    };
  },
};
